import { http } from "@/plugins/axios";
import router from "@/plugins/router";
import XEUtils from "xe-utils";
import dayjs from "dayjs";
const storage = useStorage();

export default () => {
  const getPerformance = async (id,monthStr="") => {
    return await http.request({
      url: `/admin/employee/${id}/performance?monthStr=${monthStr}`,
      method: "get",
    });
  };

  const getSalePerformance = async (id,monthStr="") => {
    return await http.request({
      url: `/admin/employee/${id}/saleperformance?monthStr=${monthStr}`,
      method: "get",
    });
  };

  return {
    getPerformance,
    getSalePerformance
  };
};
